#include <nice2d/deserializerfactory.h>
#include <nice2d/objectfactory.h>

SerializerPointer DeserializerFactory::create(const std::string &name,
                                              const PTree &node)
{
    if(!ObjectFactory<DeserializerFactory, std::string>::creator)
        return nullptr;

    auto factory = ObjectFactory<DeserializerFactory, std::string>::create(name);
    if (factory) {
        return factory->createSerializer(name, node);
    }
    return nullptr;
}

DeserializerFactory::~DeserializerFactory()
{
}
